import com.demo.controller.StudentController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

// 测试 3 种注入方式更简单的从 Spring 中取对象
public class StudentApplication {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        StudentController sc = context.getBean("studentController", StudentController.class);
        sc.sayHi();
        sc.sayHello();
        sc.toSayHi();

        sc.say1();
        sc.say2();
        sc.say3();

    }
}
